package com.bocloud.service.table;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bocloud.framework.base.BaseService;
import com.bocloud.framework.base.IBaseDao;
import com.bocloud.inter.dao.ICommentDao;
import com.bocloud.inter.service.table.ICommentService;
import com.bocloud.model.Comment;

@Service
public class CommentService extends BaseService<Comment> implements ICommentService {
	@Resource(name = "commentDao")
	ICommentDao commentDao;

	@Resource(name = "commentDao")
	public void setDao(IBaseDao<Comment> dao) {
		super.setDao(dao);
	}

	@Override
	@Transactional
	public Comment get(String id) {
		Comment model = commentDao.get(id);
		if (model == null)
			return new Comment();
		return model;
	}
}
